Method and system for automatic peripheral device identification

ABSTRACT

Method and system for latency-independent peripheral device identification. The computer system receives an interrupt from a peripheral device via a communications port. In response, an interrupt notification message is posted to alert a notification handler, and compliant peripheral class is determined. The voltage on a device may sense pin of the communications port for this determination. If the interrupt is indicative of the compliant peripheral class and the communications port is inactive, the port is opened, and an inquiry is sent and a response is received. If a response is received within a predetermined time period, an identification notification message is posted based on the response including information for classifying the peripheral device, so that a software handler registered with the operating system can handle the identification notification message when the software handler receives it. Thus, no time-critical interrupt response requirement is imposed for its successful operation.

RELATED U.S. PATENT APPLICATION

This Divisional Application claims the benefit and priority to thecommonly-owned US patent application with application Ser. No.10/754,969, filed on Jan. 9, 2004, by Lemke et al., and titled “MethodAnd System For Automatic Peripheral Device Identification,” which is aContinuation Application that claims the benefit and priority to thecommonly-owned U.S. patent application Ser. No. 09/727,228 filed on Nov.29, 2000, now issued as a U.S. Pat. No. 6,694,428, by Lemke et al., andtitled “Method And System For Latency-Independent Peripheral DeviceIdentification,” which are incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to peripheral device identification andinterrupt management. More specifically, the present invention pertainsto a method and system that enables device identification to beperformed without a rigid time limit within which an initial interruptfrom the device needs to be serviced.

2. Related Art

Computer systems and other electronic devices have become integral toolsthat are used extensively to perform a wide variety of useful operationsin modern society. Applications of computer systems can be found invirtually all fields and disciplines, including but not limited tobusiness, industry, scientific research, education and entertainment.For instance, computer systems are used to analyze financial data, tocontrol industrial machinery, to model chemical molecules, to deliverclassroom presentations and to generate special effects for movies.Moreover, computer systems along with other electronic devices arefinding new applications as a result of advances in hardware technologyand rapid development in software technology. The growing affordabilityof computer systems and electronic devices together with the abundanceof useful new applications have fueled strong demand for such systemsand devices.

Included within this broad category of computers and electronic devicesis the personal digital assistant (commonly referred to as a PDA).Specifically, as the components required to build a computer system havebeen greatly reduced in size, new categories of computer systems haveemerged. One of these new categories of computer systems is the PDA. APDA is a portable computer system which is small enough to be heldconveniently and comfortably in the hand of its user. In particular, apopular size for the typical PDA approximates the size of a palm.

The PDA is usually a battery-powered device that is typically used as anelectronic organizer having the capability to store and display a widerange of information which can include numerous addresses and telephonenumbers of business and personal acquaintances, financial information,daily appointments, along with various other personal information. Assuch, the PDA is able to consolidate a wide variety of information andmake the information easily accessible by its user. Therefore, PDAs arevery useful and have gained wide popularity.

Since PDAs are such small devices, full-sized keyboards are generallynot efficient input devices. For instance, PDAs using keyboards usuallyhave keyboard devices that are so small that a user typically cannottouch-type on them. Many PDAs thus employ a stylus and a digitizer padas an input system. The stylus and digitizer pad work well for PDAsbecause the arrangement allows a user to hold the PDA in one hand whilewriting with the stylus onto the digitizer pad with the other hand. Asmall on-screen keyboard image can also be used for data entry. Byeliminating the need for a keyboard, PDAs are very portable and can becarried along by their users wherever they go, even when on extendedtravel. On the other hand, due to their small size, PDAs usually have amodest set of built-in functions and it is often beneficial to coupleperipheral devices therewith to expand functionality. The greater thevariety of peripheral devices a PDA is capable of operating with, thebroader the functionality it can achieve.

Moreover, the management of communications port contention and powerconsumption affect the ease of use and the battery life of PDAs andother hand-held computers. A typical PDA includes limited communicationsport resources. For example, the Palm V personal organizer, manufacturedby Palm Computing, Inc. of Santa Clara, Calif., has a singlecommunications port available to interface with peripherals. When thecommunications port is exclusively occupied by a peripheral, thecommunications port is unavailable for other uses. Thus, a PDA with anactive keyboard occupying the communications port, for instance, may beunable to perform an infrared (IR) synchronization process with anotherdevice.

Another ease of use issue is the degree of user intervention required tomanage a communications port and identify peripheral devices coupledthereto. Requiring a user to manually open the communications port andidentify a peripheral device, such as through the graphical userinterface (GUI) or the buttons of the PDA or hand-held computer, isgenerally less preferable to automatically opening the communicationsport and identifying the peripheral device when the PDA receivesinformation from a peripheral device upon coupling. Further, requiring auser to explicitly close the communications port is also generally lessdesirable than automatically closing the communications port after theperipheral device and the PDA no longer exchange data. In one existingsolution, the PDA will automatically close a communications channel,which was opened to work with a keyboard peripheral, when the PDA isprompted with a signal initiating a synchronization process, such aswhen the PDA is placed in a cradle for a HotSync process. However, if auser forgets to explicitly close the communications port after using akeyboard that occupied the communications port, the user may be unableto perform an infrared synchronization process. In such cases, thesynchronization process cannot be initiated until the situation isresolved. A user unfamiliar with the problem may even have the mistakenimpression that the PDA has malfunctioned.

Furthermore, requiring a user to manually close the communications portalso affects power consumption. Battery powered systems, such as PDAsand other hand-held devices, are sensitive to applications that drainexcessive power. Thus, PDAs mostly leave their communications ports in alow power standby mode, because an open communications channel mayconsume significant power. For example, the Palm V personal organizerhas a communications port included in the processor that is sharedbetween an infrared communications port and an RS-232 serialcommunications port. The Palm V hand-held organizer keeps these ports instandby mode to reduce power consumption. A user who forgets to closethe communications port after a peripheral device is no longer beingused may suffer a significantly decreased battery life, and be forced torecharge or change batteries often.

Even if a user remembers to close the communications port when theattached peripheral device is no longer being used, the port has to bereopened for further communications with a peripheral device when use isresumed. When the communications port is reopened, the attachedperipheral device needs to be identified. Identifying the peripheraldevice permits the PDA to open appropriate applications and selectappropriate communication protocols. Some existing hand-held computersprovide limited capability for identifying peripheral devices. Forexample, in an existing Palm organizer, this is implemented with twopins on a serial port. According to this technique, an interrupt isgenerated by bringing up one of the pins (e.g., making the pin “high”).An interrupt routine then checks the second pin to determine if it ishigh or low (e.g., high indicates modem, low indicates cradle). Oneproblem with this technique is that it only allows two different typesof devices to wake up the serial port. In other words, this peripheraldevice identification scheme is limited to identifying one of twodevices, for example, a cradle versus a modem. As hand-held computertechnology advances and its applications multiply, an increasing numberof peripheral devices are becoming available for use with hand-heldcomputers and PDAs, but the existing device identification technique arenot capable of distinguishing among the numerous devices.

Some other approaches to peripheral device identification are capable ofidentifying more than two types of devices. Typically, such approachesinvolve performing certain detection activities in a given time periodimmediately following the initial interrupt generated by the device asdescribed above. According to these approaches, additional input isgenerated by the peripheral device and received by the hand-heldcomputer during this prescribed time period. For example, the additionalinput may include one or more specific characters or additionalinterrupt(s). Based on the additional input, such as by monitoring forthe specific inbound character(s) or by counting the additionalinterrupts, the hand-held computer determines the type of the peripheraldevice being coupled thereto.

Nevertheless, these identification schemes also have their shortcomings.In particular, these schemes impose a hard limit on the latency withinwhich the initial interrupt generated by the peripheral device must behandled in order for the respective schemes to succeed. Such atime-critical interrupt response requirement is undesirable because thehand-held computer may be engaged in other computations when the initialinterrupt is generated and thus may be unable to service the interruptwithin the requisite time frame. Under these circumstances, peripheraldevice identification according to these time-critical schemes wouldfail.

Thus, in view of the foregoing problems that are inherent in existingperipheral device identification schemes, it would be highlyadvantageous to provide a peripheral device identification system andmethod that facilitates extendible identification of various peripheraldevices, where the successful operation of the system and method doesnot require that the initial interrupt generated by the peripheraldevice be handled within a critical time period.

Additionally, a method and system for peripheral device identificationshould not require complete revamping of existing hand-held computersystems or PDAs. In other words, in implementing a viable method andsystem for peripheral device identification, components that are wellknown in the art and are compatible with existing hand-held computersystems need to be used so that the cost of realizing the method andsystem for peripheral device identification is low. By so doing, theneed to incur costly expenditures for retrofitting existing hand-heldcomputer systems or for building custom components is eliminated.

SUMMARY

It would be advantageous to provide a method and system for peripheraldevice identification that enables extendible identification of variousperipheral devices, and yet the successful operation of the system andmethod does not require that the initial interrupt generated by theperipheral device be handled within a critical time period. Furthermore,it would also be advantageous for such method and system to utilizecomponents that are well known in the art and are compatible withexisting computer systems such that the method and system can readilyoperate with other systems and applications without extensiveretrofitting.

Accordingly, the present invention provides a method and system forextendible identification of peripheral devices which islatency-independent. More particularly, embodiments of the presentinvention impose no critical interrupt response requirement forsuccessful operation, thus providing a superior and more flexiblesolution to peripheral device identification than existing approaches.Moreover, embodiments of the present invention can be efficientlyimplemented using components that are well known in the art and arecompatible with existing hand-held computer systems as well asperipheral devices. As such, the present invention delivers a method andsystem that is readily operable with existing systems and applicationswithout extensive retrofitting. These and other advantages of thepresent invention not specifically mentioned above will become clearwithin discussions of the present invention presented herein.

More specifically, in one embodiment of the present invention, a methodfor identifying a peripheral device detachably coupled to a computersystem is provided. In this embodiment, an interrupt is received by thecomputer system from the peripheral device, which is coupled to acommunications port of the computer system. In response to theinterrupt, an interrupt notification message is posted to alert anotification handler running on the computer system. It is nextdetermined whether the interrupt is indicative of a compliant peripheralclass. In one embodiment, this is achieved by examining a device sensepin of the communications port to determine the voltage thereon. If theinterrupt is determined to be indicative of the compliant peripheralclass and the communications port is inactive, the port is opened, andan inquiry is sent to the peripheral device via the open port. Thecomputer system then waits to receive a response from the peripheraldevice via the open communications port. If a response is receivedwithin a predetermined time period, an identification notificationmessage is posted based on data in the response, which data includeinformation for classifying the peripheral device, so that a softwarehandler registered with the operating system can handle theidentification notification message when the software handler receivesit.

In a specific embodiment, the present invention includes the above andwherein the computer system is a PDA. In a currently preferredembodiment, the present invention includes the above and wherein thecompliant peripheral class comprises RS-232 peripherals.

Another embodiment of the present invention includes the above recitedsteps and further comprises the step of posting a no-responsenotification message to trigger further processing, if no response isreceived within the predetermined time period after the inquiry is sent.

BRIEF DESCRIPTION OF THE DRAWINGS

The accompanying drawings, which are incorporated in and form a part ofthis specification, illustrate embodiments of the invention and,together with the description, serve to explain the principles of theinvention:

FIG. 1 is a system illustration of an exemplary personal digitalassistant computer system connected to other computer systems and theInternet via a cradle device.

FIG. 2A is a top side perspective view of an exemplary personal digitalassistant computer system.

FIG. 2B is a bottom side perspective view of the personal digitalassistant computer system of FIG. 2A.

FIG. 3 is an exploded view of the components of the exemplary personaldigital assistant computer system of FIG. 2A.

FIG. 4 is a perspective view of the cradle device for connecting thepersonal digital assistant computer system to other systems via acommunication interface.

FIG. 5 is a logical block diagram of circuitry located within theexemplary personal digital assistant computer system of FIG. 2A.

FIG. 6 is a block diagram of a system practicing peripheral deviceidentification in accordance with one embodiment of the presentinvention.

FIG. 7 is a flow diagram illustrating steps for identifying a peripheraldevice detachably coupled to a computer system in accordance with oneembodiment of the present invention.

DETAILED DESCRIPTION OF THE INVENTION

In the following detailed description of the present invention, a methodand system for latency-independent peripheral device identification,numerous specific details are set forth in order to provide a thoroughunderstanding of the present invention. However, it will be recognizedby one skilled in the art that the present invention may be practicedwithout these specific details or with equivalents thereof. In otherinstances, well known methods, procedures, components, and circuits havenot been described in detail as not to unnecessarily obscure aspects ofthe present invention.

Notation and Nomenclature

Some portions of the detailed descriptions which follow are presented interms of procedures, steps, logic blocks, processing, and other symbolicrepresentations of operations on data bits within a computer memory.These descriptions and representations are the means used by thoseskilled in the data processing arts to most effectively convey thesubstance of their work to others skilled in the art. A procedure,computer executed step, logic block, process, etc., is here, andgenerally, conceived to be a self-consistent sequence of steps orinstructions leading to a desired result. The steps are those requiringphysical manipulations of physical quantities. Usually, though notnecessarily, these quantities take the form of electrical or magneticsignals capable of being stored, transferred, combined, compared, andotherwise manipulated in a computer system. It has proven convenient attimes, principally for reasons of common usage, to refer to thesesignals as bits, values, elements, symbols, characters, terms, numbers,or the like.

It should be borne in mind, however, that all of these and similar termsare to be associated with the appropriate physical quantities and aremerely convenient labels applied to these quantities. Unlessspecifically stated otherwise as apparent from the followingdiscussions, it is appreciated that throughout the present invention,discussions utilizing terms such as “receiving”, “posting”, “opening”,“sending”, “monitoring”, “examining” or the like, refer to the actionand processes of a computer system (e.g., FIG. 5), or similar electroniccomputing device, that manipulates and transforms data represented asphysical (electronic) quantities within the computer system's registersand memories into other data similarly represented as physicalquantities within the computer system memories or registers or othersuch information storage, transmission or display devices.

Aspects of the present invention, described below, are discussed interms of steps executed on a computer system. These steps (e.g., process700) are implemented as program code stored in computer readable memoryunits of a computer system and are executed by the processor of thecomputer system. Although a variety of different computer systems can beused with the present invention, an exemplary personal digital assistantcomputer system is shown in FIG. 5 further below.

An Illustrative Computer System Environment within which Embodiments ofthe Present Invention can be Practiced

Referring now to FIG. 1, a system 50 that can be used in conjunctionwith the present invention is shown. It is appreciated that the methodand system for latency-independent peripheral device identification ofthe present invention can be used in conjunction with any computersystem and that system 50 is illustrative rather than limiting. It isfurther appreciated that the portable computer system 100 describedbelow is only exemplary. System 50 comprises a host computer system 56which can either be a desktop unit as shown, or, alternatively, can be alaptop computer system 58. Optionally, one or more host computer systemscan be used within system 50. Host computer systems 58 and 56 are shownconnected to a communication bus 54, which in one embodiment can be aserial communication bus, but could be of any of a number of well knowndesigns, e.g., a parallel bus, Ethernet, Local Area Network (LAN), etc.Optionally, bus 54 can provide communication with the Internet 52 usinga number of well known protocols.

Importantly, bus 54 is also coupled to a cradle 60 for receiving andinitiating communication with a personal digital assistant computersystem 100. Cradle 60 provides an electrical and mechanicalcommunication interface between bus 54 (and anything coupled to bus 54)and computer system 100 for two way communications. Computer system 100also contains a wireless infrared communication mechanism 64 for sendingand receiving information from other devices. A more detaileddescription of the structure of an illustrative implementation ofcomputer system 100 and its operation in conjunction with variousperipheral devices is presented further below with reference to FIG. 6.

With reference to FIG. 2A, a perspective illustration of the top face100 a of exemplary personal digital assistant computer system 100 isshown. Top face 110 a contains a display screen 105 surrounded by abezel or cover. A removable stylus 80 is also shown. Display screen 105is a touch screen capable of registering contact between the screen andthe tip of stylus 80. Stylus 80 can be fabricated of any material whichcan make contact with screen 105. Top face 100 a also contains one ormore dedicated and/or programmable buttons 75 for selecting informationand causing computer system 100 to implement functions. An on/off button95 is shown as well.

Referring still to FIG. 2A, a handwriting recognition pad or “digitizer”containing regions 106 a and 106 b is also shown. Specifically, region106 a is for the drawing of alpha characters therein for automaticrecognition and region 106 b is for the drawing of numeric characterstherein for automatic recognition. Stylus 80 is used for stroking acharacter within one of the regions 106 a and 106 b. The strokeinformation is then fed to an internal processor for automatic characterrecognition. Once characters are recognized, they are typicallydisplayed on screen 105 for verification and/or modification.

FIG. 2B illustrates the bottom side 100 b of one embodiment of personaldigital assistant computer system 100. An optional extendible antenna 85is shown, and a battery storage compartment door 90 is shown as well. Acommunication interface 108 is also shown. In one embodiment of thepresent invention, the serial communication interface 108 comprises aserial communication port, but it could also alternatively be of any ofa number of well known communication standards and protocols, e.g.,parallel, small computer system interface (SCSI), Ethernet, Firewire(IEEE 1394), etc. In a currently preferred embodiment, communicationinterface 108 comprises an interrupt pin and a device sense pin,sometimes also known as a VID pin. Communication interface 108 inaccordance with the present invention is described in further detailbelow with reference to FIG. 6.

With reference now to FIG. 3, an exploded view of the exemplary personaldigital assistant computer system 100 is shown. System 100 contains afront cover 210 having an outline of region 106 and holes 75 a forreceiving buttons 75 b. A flat panel display 105 (both liquid crystaldisplay and touch screen) fits into front cover 210. Any of a number ofdisplay technologies can be used, e.g., liquid crystal display (LCD),field emission device (FED), plasma, etc., for the flat panel display105. A battery 215 provides electrical power. A contrast adjustment(potentiometer) 220 is also shown. On/off button 95 is shown along withan infrared emitter and detector device 64. A flex circuit 230 is shownalong with a PC board 225 containing electronics and logic (e.g.,memory, communication bus, processor, etc.) for implementing computersystem functionality. The digitizer pad is also included in PC board225. A midframe 235 is shown along with stylus 80. Position adjustableantenna 85 is also shown.

Additionally, a radio receiver/transmitter device 240 is also shownbetween the midframe and the rear cover 245 of FIG. 3. Radioreceiver/transmitter device 240 is coupled to antenna 85 and alsocoupled to communicate with PC board 225. In one implementation, theMobitex wireless communication system is used to provide two waycommunication between system 100 and other networked computers and/orthe Internet via a proxy server.

FIG. 4 is a perspective illustration of one embodiment of the cradle 60for receiving the personal digital assistant computer system 100. Cradle60 contains a mechanical and electrical interface 260 for interfacingwith serial connection 108 (FIG. 2B) of computer system 100 when system100 is slid into the cradle 60 in an upright position. Once inserted,button 270 can be pressed to initiate two way communication betweensystem 100 and other computer systems coupled to serial communicationbus 54.

Referring now to FIG. 5, a block diagram of exemplary personal digitalassistant computer system 100 is shown. Some of the modules shown inFIG. 5 can be implemented on PC board 225. Computer system 100 includesan address/data bus 99 for communicating information, a centralprocessor 101 coupled with bus 99 for processing information andinstructions, a volatile memory unit 102 (e.g., random access memory,static RAM, dynamic RAM, etc.) coupled with bus 99 for storinginformation and instructions for central processor 101 and anon-volatile memory unit 103 (e.g., read only memory, programmable ROM,flash memory, EPROM, EEPROM, etc.) coupled with bus 99 for storingstatic information and instructions for processor 101. As describedabove, computer system 100 also contains a display device 105 coupled tobus 99 for displaying information to the computer user. PC board 225 cancontain processor 101, bus 99, volatile memory unit 102, andnon-volatile memory unit 103. As described further below, portions ofmemory units 102 and 103 can be removed from computer system 100.Moreover, computer system 100 can also include an optional data storagedevice 104 (e.g., memory stick) for storing information andinstructions. In one embodiment, optional data storage device 104 isremovable from computer system 100.

Also included in computer system 100 of FIG. 5 is an optionalalphanumeric input device 106 which, in one implementation, is ahandwriting recognition pad (“digitizer”) having regions 106 a and 106 b(FIG. 2A), for instance. Device 106 can communicate information andcommand selections to central processor 101. Computer system 100 alsoincludes an optional cursor control or directing device 107 coupled tobus 99 for communicating user input information and command selectionsto central processor 101. In one implementation, device 107 is a touchscreen device incorporated with screen 105. In this implementation,device 107 is capable of registering a position on screen 105 where astylus makes contact. Display device 105 utilized with computer system100 may be a liquid crystal device (LCD), cathode ray tube (CRT), fieldemission device (FED, also called flat panel CRT) or other displaydevice suitable for creating graphic images and alphanumeric charactersrecognizable to the user. In a currently preferred embodiment, display105 is a flat panel display. Computer system 100 also includes signalcommunication interface 108, which is also coupled to bus 99, and can bea serial port for communicating with cradle 60. Communication interface108 can also include an infrared communication mechanism.

It is appreciated that computer system 100 described herein illustratesan exemplary configuration of an operational platform upon whichembodiments of the present invention can be implemented. Nevertheless,other computer systems with differing configurations can also be used inplace of computer system 100 within the scope of the present invention.

Referring next to FIG. 6, a block diagram is shown of a system 600practicing peripheral device identification in accordance with oneembodiment of the present invention. System 600 includes a hand-heldcomputer 100 and a peripheral device 140. Example embodiments of thehand-held computer 100 include various models of the Palm hand-heldorganizers, as well as numerous other hand-held computers running aversion of the Palm operating system, or PalmOS. Additional embodimentsinclude other hand-held computers, such as those running a version ofMicrosoft's Windows CE operating system and those running a version ofthe EPOC operating system, as well as set-top boxes. On the other hand,examples of peripheral devices include keyboards, cradles, modems, othercomputers such as hand-held computers, along with other hardware modulesor accessories not specifically mentioned herein.

As illustrated in FIG. 6, hand-held computer 100 includes a memory 110(e.g., volatile memory unit 102, non-volatile memory unit 103 of FIG. 5)and processor 101. Memory 101 can store various programs, or sequencesof instructions for execution by processor 101. Example programs showninclude a notification handler 112 and registered software handlers 114and 116. Other programs 118 can include programs for carrying out otherinternal functions of hand-held computer 100 and for carrying outfunctions appropriate with peripheral device 140. Some of the programsmay be included in device drivers, the operating system, and/orapplications.

In a currently preferred embodiment, hand-held computer 100 furtherincludes infrared interface 64 and a connector 135, and processor 101includes a communications port 125. In this embodiment, communicationinterface 108 (FIG. 1) of computer 100 comprises infrared interface 64,communications port 125, and connector 135. Hand-held computer 100communicates with peripheral device 140 via one or more communicationsports 125. In one embodiment, processor 101 is a DragonBall processormanufactured by Motorola, Inc. For example, the Palm 111× and Palm Vhand-held computers use a DragonBall processor model known as theDragonBall EZ MC68EZ238 Integrated Microprocessor. Other embodiments usedifferent microprocessors. An embodiment implemented using theDragonBall EZ processor has a communications port 125 that includes oneserial port, while other embodiments of the present invention caninclude multiple serial ports, one or more parallel port(s), or otherconfigurations.

It is appreciated that even though embodiments of the present inventionare not limited to one communications port but rather can includemultiple communication ports, the present invention beneficially enablesan increase in the total number of peripherals which the hand-heldcomputer can identify.

In accordance with the present invention, communications port 125communicates with peripheral device 140 via a wired or wirelessconnection. An example of a wireless connection is a communication linkbetween two hand-held computers 100 and 142 carried out in infraredthrough infrared interface 64 coupled to communications port 125. Ininfrared communication, an infrared transceiver included in infraredinterface 64 of hand-held computer 100 communicates with the infraredtransceiver of another hand-held computer 142. In one embodiment, thetransceivers follow an IrDA (Infrared Data Association) protocol. Inother embodiments, other protocols are used.

An example of a wired connection is a communication link betweenhand-held computer 100 and cradle 60, through connector 135 coupled tocommunications port 125. This is a configuration that is often used tosynchronize data between hand-held computer 100 and another computer 146(e.g., desktop computer 56 or laptop computer 58 of FIG. 1). Anotherexample of a wired connection is a communication link between hand-heldcomputer 100 and a keyboard 150 through connector 135.

Within the scope of the present invention, in addition to the devicesmentioned above, peripheral device 140 can also be a modem 148, devicesfor cellular or personal communication services, other wireless devices152 including radio, infrared, and acoustic communication peripherals,as well as Bluetooth devices. Information on the Bluetooth communicationspecification is not described herein but is available on the Internetat the address http://www.bluetooth.com. In a currently preferredembodiment, peripheral device 140 includes circuitry for sending awake-up signal (e.g., an interrupt) to hand-held computer 100 throughconnector 135, as well as circuitry for identifying to hand-heldcomputer 100 the type (e.g., peripheral class) of peripheral device 140.Both sets of circuitry are electrically coupled to hand-held computer100 through connector 135.

In communication through connector 135, one embodiment of the presentinvention uses an electrical transceiver and a serial connector with tenpins supporting EIA562 interface signals and RS-232 protocolcommunications, and additional signals for support of another peripheraldevice 140.

One possible configuration of connector 135 supporting EIA562 interfacesignals and RS-232 protocol communications includes DTR (data terminalready), VCC, RD (receive data), RTS (request to send), TD (transmitdata), CTS (clear to send), GPI1 (HotSync initiation interrupt line),GPI2 (peripheral identification line for synchronization), a pinreserved for future designs, and SG (signal ground).

Another possible configuration of connector 135 supporting EIA562interface signals and RS-232 protocol communications includes DO(voltage doubler output or data terminal ready), VBATT+(tied to thebattery), RXD (receive data), RTS (request to send), TXD (transmitdata), CTS (clear to send), I1 (HotSync initiation interrupt line), I2(peripheral identification line for synchronization), a pin reserved forfuture designs, and SG (signal ground).

Other embodiments of connector 135 include parallel connectors,different pin configurations, a different number of pins, and differentconnector signals including DSR (data set ready), RI (ring indicator),CD (carrier detect), and TC (transmitter clock).

One embodiment of hand-held computer 100 includes an electricaltransceiver used in communication through connector 135. When theelectrical transceiver is shut down, the transceiver sends a lowRS-232_V+ signal of 3.0 volts to connector 135. In the Palm hand-heldorganizer, the electrical transceiver is shut down or placed in standbymode when connector 135 is inactive in order to conserve power andlengthen the battery life for hand-held computer 100. When softwarerunning on processor 101 of hand-held computer 100 opens communicationsport 125, the transceiver is enabled and sends to connector 135 anasserted signal, a high RS-232_V+ signal of 6.0 volts. Other embodimentsinclude communications protocols that are simplex and half duplex inaddition to the full duplex RS-232 protocol. Additional embodimentssupport RS-485, RS-422, IEEE-1284, IEEE-1394, and USB standards.

Operation of Identification for Automatic Peripheral Device

Referring next to FIG. 7, a flow diagram 700 illustrating steps foridentifying a peripheral device detachably coupled to a computer systemin accordance with one embodiment of the present invention is shown. Instep 710, an interrupt is received by the computer system from aperipheral device coupled to a communications port of the computersystem. In a currently preferred embodiment, the communications port isa serial communications port. Moreover, in an embodiment wherein thecomputer system is a Palm PDA, the interrupt is a HotSync interrupt.

Referring still to FIG. 7, in step 720, an interrupt notificationmessage is posted to alert a notification handler running on thecomputer system, in response to the interrupt received in step 710. Inone embodiment, the state of the device sense pin (VID pin) is includedin the interrupt notification message.

In a currently preferred embodiment practiced upon a Palm compatibledevice (e.g., a device running on the Palm OS), a HotSync interrupthandler of the PalmOS reads the value of the VID pin and posts aninterrupt notification message with this information. This notificationmessage alerts, and is caught by, a HotSync interrupt notificationhandler which is registered with the PalmOS.

It is appreciated that in accordance with the present invention, themethod by which the VID pin is read varies from device to device. Forexample, those devices that measure the voltage with an ADC will read avoltage and translate it into an enumerated value. This is no differentthan what is done for current Palm V devices which support only twoenumerated types, namely, cradle or modem. On the other hand, deviceswithout an ADC will just read a single bit off a port. In either case,the value will be posted as data along with the interrupt notificationmessage according to this embodiment.

With reference still to FIG. 7, in step 730, it is determined whetherthe interrupt received is indicative of a compliant peripheral class. Inone embodiment, the state (e.g., voltage) on the device sense pin of thecommunications port (e.g., posted as data along with the interruptnotification message of step 720) is used in this determination. In acurrently preferred embodiment practiced upon a Palm compatible device,the HotSync interrupt notification handler examines the notificationdata and determines if the interrupt is from a compliant peripheralclass, which in this embodiment is the RS-232 peripheral class.

In accordance with this embodiment, peripheral devices connecting to aPalm device's serial port that are neither cradles nor modems and thatuse the method of the present invention (e.g., belong to the compliantperipheral class) must hold the VID pin “high” (e.g., appear as modems).In this embodiment, no intermediate voltage on the VID pin needs to bemeasured. Moreover, the only known peripherals that hold VID high anduse the interrupt pin are Palm modems, which will be distinguished fromother peripherals via their response to an inquiry sent by the Palmdevice (described below with reference to step 750). As described below,the present invention will properly handle the cases where the attacheddevice is a modem. As such, the instant embodiment is backwardcompatible with existing Palm devices, including the Bernie keyboardwhich holds VID low.

It is appreciated that future Palm devices, which might classifyperipherals based on voltage ranges on the VID pin, can alsoadvantageously utilize the present invention in a slightly differentembodiments. More particularly, next generation Palm interfaces, such asBullet, have been proposed where different classes of peripherals aredistinguished via different voltage levels on the VID pin. For example,there are currently six proposed levels of VID representing sixdifferent states, namely: no connection, USB cradle, RS-232 cradle, USBperipheral, RS-232 peripheral, and debug. When embodiments of thepresent invention are applied to these new interfaces, peripheralsconforming to the present invention should set the voltage on the VIDpin to the value that corresponds to class RS-232 peripherals.

With reference still to FIG. 7, in optional step 734, if it isdetermined in step 730 that the interrupt is not indicative of thecompliant peripheral class, a non-compliance notification message isposted to trigger exception processing on the computer system. Morespecifically, in a currently preferred embodiment practiced upon a Palmcompatible device, if the HotSync interrupt notification handlerdetermines that the interrupt is not from a RS-232 peripheral, such aswhen the interrupt is from a cradle, then the HotSync interruptnotification handler posts a Cradle HotSync key event. Thus, the presentembodiment is compatible with existing Palm cradles'Cradle HotSyncfunction.

With reference again to FIG. 7, in optional step 738, if it isdetermined in step 730 that the interrupt is indicative of the compliantperipheral class and the communications port is already open, aport-in-use notification message is posted to trigger furtherprocessing. More specifically, in a currently preferred embodimentpracticed upon a Palm compatible device, if the HotSync interruptnotification handler determines that the interrupt is from a RS-232peripheral, such as a modem, and further determines that the serial portis already open (e.g., the port is active), then the handler posts aModem HotSync with Serial Port Open notification, thereby triggering theModem HotSync process. As such, the present embodiment advantageouslyprovides compatibility with existing Palm modems' Modem HotSyncfunction.

Referring again to FIG. 7, in step 740, if it is determined in step 730that the interrupt is indicative of the compliant peripheral class, andthe communications port is inactive, the port is opened. Morespecifically, in a currently preferred embodiment practiced upon a Palmcompatible device, if the HotSync interrupt notification handlerdetermines that the interrupt is from a RS-232 peripheral, and alsodetermines that the serial port is not open (e.g., the port isinactive), then the handler opens the serial port. In one embodiment,the port is opened at a default baud rate of 9600 baud.

Still referring to FIG. 7, in step 750, an inquiry is sent to theperipheral device via the open communications port. In a currentlypreferred embodiment, the HotSync interrupt notification handler sendsan inquiry, which comprises the ASCII command “ATI3” followed by a CR/LFpair, to the peripheral by way of the open serial port.

With reference again to FIG. 7, in step 760, the communications port ismonitored for a predetermined time period in order to receive aresponse, if any, from the peripheral device via the port. In step 765,it is determined whether a proper response has been received from theperipheral device within the predetermined time period.

Referring yet again to FIG. 7, in step 770, if it is determined in step765 that a proper response has been received from the peripheral devicevia the communications port within the predetermined time period, anidentification notification message is posted based on data in theresponse, including information for classifying the peripheral device,so that a software handler registered with the operating system canhandle the identification notification message (e.g., the appropriatehandler performs, or caused to be performed, actions necessary toinitialize the attached device) when the software handler receives it.

With reference still to FIG. 7, in optional step 775, if it isdetermined in step 765 that a proper response has not been received fromthe peripheral device via the communications port within thepredetermined time period, a no-response notification message to triggerfurther processing.

With reference still to FIG. 7, in optional step 785, in the event thatan identification notification message has been generated but thesoftware handler responsible for handling the identificationnotification message fails to do so, a default action is triggered. Itis appreciated that this scenario includes the case where the softwarehandler is not properly installed or registered, or not installed atall.

Particularly, in a currently preferred embodiment practiced upon a Palmcompatible device, the HotSync interrupt notification handler monitorsthe serial port and waits for a response from the peripheral for 20 ms.If the HotSync interrupt notification handler does not receive at leastone character from the peripheral device within the allotted time, ano-response notification is posted. If at least one character isreceived within 20 ms from the initiation of the inquiry, the HotSyncinterrupt notification handler will wait for a maximum of 100 ms oruntil a CR/LF pair is received.

Further, in this embodiment, if a full response, terminated by a CR/LFpair, is received within the 100 ms, then the HotSync interruptnotification handler posts an identification notification message, withthe ID string of the peripheral's response as data, to indicate that theperipheral queried has responded properly. In one embodiment, theidentification information is propagated to a registered handler througha system notification or broadcast mechanism, such as through theNotification Manager supported by PalmOS version 3.5 or newer. However,if the character(s) received are not terminated by a CR/LF pair, then ano-response notification is posted instead. Within the scope of thepresent invention, it is up to the developers (of peripheral devices andtheir drivers, for example) to register custom-developed,device-specific software handler(s) with the operating system so thatthese special handlers will receive identification notificationscorresponding to the peripheral(s) in which they are interested (e.g.,those responses which contain the matching peripheral ID(s) in the datastring) and handle them accordingly. Failing to do so would cause theidentification notification to be handled in a default manner, asdescribed below.

In accordance with one embodiment of the present invention, should noregistered handler handle an identification notification message(described above with reference to optional step 785), a default lowpriority handler, installed by the operating system, will handle thenotification by posting a Modem HotSync key event. Likewise, in anotherembodiment, should no registered handler handle a port-in-usenotification message (described above with reference to optional step738), a default low priority handler, installed by the operating system,will handle the notification by posting a Modem HotSync key event.Moreover, in yet another embodiment, where no response to the inquiry isreceived (described above with reference to optional step 775), ano-response notification message will be posted and the PalmOS will postthe Modem HotSync key as well. This allows third party developers tocatch this event and thus use this interrupt.

In an alternative embodiment, high priority notification handlers (e.g.,having a higher priority than the HotSync interrupt notificationhandler) can be used in placed of the software handlers described above.In this embodiment, no device identification step needs to be performedbecause each high priority notification handler will directly catch andservice an interrupt from its respective peripheral device when such aninterrupt is sent via the communications port, without the aid of theHotSync interrupt notification handler. In other words, the processingsteps described above with respect to the various actions of the HotSyncinterrupt notification handler are no longer required in thisalternative embodiment, as each device-specific interrupt will directlyalert its own special high priority notification handler(s) which willthen perform the necessary action appropriate for the device generatingthe interrupt.

As thus described, the present invention performs neither detection ofperipheral device attachment or detachment, nor counting of interruptsor time intervals. Moreover, unlike some prior art schemes, no furtherinquiry or signal is initiated by the device subsequent to, and withinsome period of, the initial interrupt in order for the present inventionto operate. Rather, in accordance with the present invention, aperipheral device simply sends an interrupt to ‘wake up’ the operatingsystem of the hand-held computer. Thereupon, a system notificationhandler is alerted to execute and initiate the device identificationprocess by sending an inquiry to the peripheral device in response tothe initial interrupt. Once the device is identified, the identificationinformation is furnished to a registered handler which facilitatesfurther interaction with the device. Alternatively, one or more highpriority device-specific notification handlers can be installed instead,in which case each of the high priority handlers directly handle its owninterrupt(s), and the system notification handler is unnecessary.

Significantly, embodiments of the present invention impose notime-critical interrupt response requirement for successful operation.Therefore, the present invention provides a superior solution toperipheral device identification than existing approaches, because thepresent invention is neither limited in the number of devices that canbe identified, nor constrained by the dependence on the latency withinwhich the initial device interrupt must be handled. In other words, byutilizing the present invention, even if a HotSync interrupt cannot beattended to immediately by the operating system, device identificationwill not be affected because there is no rigid time limit within whichthe interrupt must be serviced. As such, the present inventionadvantageously eliminates the latency dependency of prior art deviceidentification schemes. In addition, there is no need to “patch” theinterrupt service routine of the operating system or otherwise modifylow level system code every time a new peripheral device is added to thelist of devices that have to be identified. This greatly reduces thetime required in the development cycle and provides an importantadvantage over the prior art, especially in a time-critical developmentenvironment.

Furthermore, since embodiments of the present invention utilizecomponents and communication protocols/handshakes that are already partsof or supported by existing hand-held computer systems and that are wellknown in the art, such as serial communication ports and HotSyncinterrupts, respectively, embodiments of the present invention can beefficiently implemented and advantageously afford compatibility withother systems and applications, thereby providing latency-independentperipheral device identification capability while minimizing the cost tothe user. Additionally, embodiments of the present invention can also beconveniently adapted to work with proposed communications portinterfaces.

Although certain embodiments of the present invention as describedherein pertains to PDAs such as Palm compatible organizers, it isappreciated that many other advantageous applications are possiblewithin the scope of the present invention. For example, the presentinvention can be advantageously applied to the peripheral deviceidentification mechanism of numerous other devices, such as mobilephones. Therefore, the present invention enables numerous possibilitiesin modern society where a wide range of systems and appliances requirethe capability of peripheral device identification. It should be clearto a person of ordinary skill in the art, having read the description ofembodiments of the present invention herein, that other applications andembodiments not expressly described herein are also possible withoutdeparting from the scope and spirit of the present invention.

The preferred embodiment of the present invention, a method and systemfor latency-independent peripheral device identification, is thusdescribed. While the present invention has been described in particularembodiments, it should be appreciated that the present invention shouldnot be construed as limited by such embodiments, but rather construedaccording to the below claims.

1. A computer system for communicating with a peripheral devicecommunicatively coupled thereto, said computer system comprising: aprocessor for posting a notification message to alert a high prioritydevice-specific notification handler in response to a signal receivedfrom said peripheral device, said high priority device-specificnotification handler having a priority higher than a system notificationhandler and being capable of directly servicing said signal from saidperipheral device without involving said system notification handler; amemory coupled to said processor; and a communications port coupled tosaid processor, said communications port for receiving said signal fromsaid peripheral device.
 2. The computer system as recited in claim 1further comprising a plurality of high priority device-specificnotification handlers.
 3. The computer system as recited in claim 1wherein said processor is operable to trigger a default action if saidhigh priority device-specific notification handler fails to handle saidnotification message.
 4. The computer system as recited in claim 1wherein said communications port is a serial communications port.
 5. Thecomputer system as recited in claim 1 wherein said communication portcomprises a device sense pin operable to provide a voltage thereon fromsaid peripheral device and wherein said processor determines whethersaid peripheral device is among a compliant class based on said voltage.6. The computer system as recited in claim 1 wherein said signal isgenerated by said peripheral device upon coupling to said communicationsport.
 7. The computer system as recited in claim 1 wherein said signalreceived comprises a state for said peripheral device, wherein saidstate is used to determine whether said peripheral device is among acompliant class.
 8. The computer system as recited in claim 7, wherein anon-compliance notification message is posted when said peripheraldevice is outside of said compliant class.
 9. The computer system asrecited in claim 1, wherein a communication port is opened when saidperipheral device is within a compliant class and said communicationport is inactive.
 10. The computer system as recited in claim 1, whereina response is received from said peripheral device when said peripheraldevice is within a compliant class, wherein said response is operable toclassify said peripheral device.